{% extends 'frontend/layout/base.html.twig' %}
{% block title %}
    {{ keyword }} - {{ setting.obj.siteName }}
{% endblock %}

{% block stylesheets %}
    {{ parent() }}

{% endblock %}

{% block javascripts %}
    {{ parent() }}

{% endblock %}

{% block page_header_wrapper %}
    <div class="akea-page-title-wrap akea-style-custom akea-center-align">
        <div class=akea-header-transparent-substitute></div>
        <div class=akea-page-title-overlay></div>
        <div class="akea-page-title-container akea-container">
            <div class="akea-page-title-content akea-item-pdlr">
                <h1 class="akea-page-title">搜索“{{ keyword }}”</h1>
                <div class=akea-page-caption>共为您找到相关结果{{ pagination.totalItemCount }}个</div>
            </div>
        </div>
    </div>
{% endblock %}

{% block page_wrapper %}
    <div class=gdlr-core-page-builder-body>
        <div class="gdlr-core-pbf-wrapper " style="padding: 70px 0px 30px 0px;">
            <div class=gdlr-core-pbf-background-wrap></div>
            <div class="gdlr-core-pbf-wrapper-content gdlr-core-js ">
                <div class="gdlr-core-pbf-wrapper-container clearfix gdlr-core-container-custom" style="max-width: 980px ;">
                    <div class=gdlr-core-pbf-element>
                        <div class="gdlr-core-blog-item gdlr-core-item-pdb clearfix  gdlr-core-style-blog-full" style="padding-bottom: 40px ;">
                            <div class="gdlr-core-blog-item-holder gdlr-core-js-2 clearfix" data-layout=fitrows>
                                {% if pagination.items|length != 0 %}
                                    {% for page in pagination.items %}
                                        <div class="gdlr-core-item-list gdlr-core-blog-full  gdlr-core-item-mglr gdlr-core-style-left">
                                            {% if page.thumbnail is not null %}
                                                <div class="gdlr-core-blog-thumbnail-wrap clearfix">
                                                    <div class="gdlr-core-blog-thumbnail gdlr-core-media-image  gdlr-core-opacity-on-hover gdlr-core-zoom-on-hover">
                                                        <a href={{ path('article_content', {id: page.id}) }}>
                                                            <img src="{{ asset(page.thumbnail) | imagine_filter('menu_thumbnail_list_image') }}" alt width=1000 height=486>
                                                        </a>
                                                    </div>
                                                    <a href="javascript:void(0);" class="zilla-likes page-like" title="喜欢" id="{{ page.id }}">
                                                        <span class="zilla-likes-count">{{ page.page_like }}</span>
                                                    </a>
                                                </div>
                                            {% endif %}
                                            <div class=gdlr-core-blog-full-content-wrap>
                                                <div class="gdlr-core-blog-full-head clearfix">
                                                    <div class=gdlr-core-blog-full-head-right>
                                                        <h3 class="gdlr-core-blog-title gdlr-core-skin-title">
                                                            <a href="{{ path('article_content', {id: page.id}) }}">{{ page.title }}</a>
                                                        </h3>
                                                        <div class="gdlr-core-blog-info-wrapper gdlr-core-skin-divider">
                                                            <span class="gdlr-core-blog-info gdlr-core-blog-info-font gdlr-core-skin-caption gdlr-core-blog-info-author">
                                                                <img alt src='{% if page.avatar is not null %}{{ asset(page.avatar) | imagine_filter('page_thumbnail_avatar_image') }}{% else %}{{ asset('images/sf-positive.svg') }}{% endif %}' class='avatar avatar-50 photo' height=50 width=50>
                                                                {% if page.nickname is not null %}{{ page.nickname }}{% else %}{{ page.username }}{% endif %}
                                                            </span>
                                                            <span class="gdlr-core-blog-info gdlr-core-blog-info-font gdlr-core-skin-caption gdlr-core-blog-info-date">
                                                                {{ page.publish_time|date('Y-m-d H:i:s', 'PRC') }}
                                                            </span>
                                                            {% if page.thumbnail is null %}
                                                                <span class="gdlr-core-blog-info gdlr-core-blog-info-font gdlr-core-skin-caption gdlr-core-blog-info">
                                                                    <a href="javascript:void(0);" class="page-like" title="喜欢" id="{{ page.id }}">
                                                                        <i class="fa fa-heart-o"></i>
                                                                        <span class="zilla-likes-count">{{ page.page_like }}</span>
                                                                    </a>
                                                                </span>
                                                            {% endif %}
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="gdlr-core-blog-content">
                                                    {{ page.summary }}
                                                </div>
                                                <div class="gdlr-core-social-share-item gdlr-core-item-pdb gdlr-core-left-align gdlr-core-social-share-left-text gdlr-core-style-plain">
                                                    <div class="tagcloud">
                                                        {% for tag in page.page_tags %}
                                                            <a class="tag-cloud-link tag-link-117 tag-link-position-1" style="padding: 5px 10px; margin: 0px 6px 6px 0px !important;">{{ tag }}</a>
                                                        {% endfor %}
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    {% endfor %}
                                {% else %}
                                    <span style="text-align: center;display: block; margin: 70px auto;">这里空空如也</span>
                                {% endif %}
                            </div>
                            <div class="gdlr-core-pagination gdlr-core-style-circle gdlr-core-left-align gdlr-core-item-pdlr">
                                {{ knp_pagination_render(pagination) }}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

{% endblock %}
